package com.mt.common.response;

import com.mt.common.enums.AppReturnCodeEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @Author: plover
 * @Date: 2020/07/06/4:27 下午
 * @Description:
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class WebResponse<T> implements Serializable {

    private Integer code;
    private String message;
    private T data;

    public boolean isSucceed() {
        return this.code == AppReturnCodeEnum.SUCCESS.getCode();
    }

}
